package top.content.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Log {

    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static int level = 0;

    public static int INFO = 0;
    public static int DEBUG = 1;
    public static int ERROR = 2;


    public static void info(String mes) {
        if (level <= INFO)
        System.out.println(sdf.format(new Date()) + " info:-----------------> " + mes);
    }

    public static void debug(String mes) {
        if (level <= DEBUG)
            System.out.println(sdf.format(new Date()) + " debug:-----------------> " + mes);
    }

    public static void error(String mes) {
        if (level <= ERROR)
            System.out.println(sdf.format(new Date()) + " error:-----------------> " + mes);
    }
}
